/*
 * Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
 * wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
 */

%cal-days {
	display: block;
	height: 100%;
	width: 100%;
}

// TODO:  Combine with previous when libsass supports nested extends
%cal-cell {
	color: $cal-day-color;
	padding: 20% 0;
	text-align: center;
}

%cal-curr-day-color {
	color: $cal-curr-day-color;
}

.wb-clndr {
	background: #fff;
	position: relative;
	width: 100%;

	.cal-nav {
		background: $cal-header-bg-color;
		padding: .5em;
		text-align: center;
	}

	.form-group {
		margin: 0;
		padding: $padding-base-vertical $padding-base-horizontal;
	}

	.btn {
		background: none;
		color: $cal-mnth-arrows-color;

		&[disabled] {
			color: $cal-mnth-arrows-disabled-color;
		}
	}

	option {
		&[disabled] {
			color: #aaa;
		}
	}

	table {
		width: 100%;
	}

	th {
		background: $cal-dow-bg;
		border: $cal-dow-border;

		abbr {
			@extend %cal-cell;

			color: $cal-dow-color;
			display: block;
		}
	}

	td {
		background: $cal-day-bg;
		border: 1px solid #aaa;
		padding: 0;
		text-align: center;

		> {
			time {
				@extend %cal-cell;

				display: block;
			}

			a {
				@extend %cal-cell;
				@extend %cal-days;
			}
		}

		a {
			&:hover,
			&:focus {
				background: $cal-day-hover-bg;
				color: $cal-day-hover-color;
			}
		}

		div {
			@extend %cal-cell;
		}
	}

	.cal-curr-day {
		@extend %cal-curr-day-color;

		background: $cal-curr-day-bg;
		font-weight: bolder;

		a,
		div {
			@extend %cal-curr-day-color;
		}
	}
}
